<template>
  <el-container>
    <!--   导航栏   -->
    <el-header>
      <NavigationBar></NavigationBar>
    </el-header>
    <el-container>
      <!--    左侧边栏    -->
      <el-aside >
        <LiftBar :sys="sys"></LiftBar>
      </el-aside>
      <el-container>
        <!--    主体      -->
        <el-main>
          <router-view :key="$route.path"></router-view>
        </el-main>
        <!--    底部标签      -->
        <el-footer>
          <Footer :record_number="sys.record_number"></Footer>
        </el-footer>
      </el-container>
    </el-container>
  </el-container>
</template>

<script lang="ts">
import {defineComponent, ref} from 'vue';
import NavigationBar from "./home/NavigationBar.vue"
import LiftBar from "./home/LiftBar.vue"
import Footer from "./home/Footer.vue"
import request from "@/utils/request";
export default defineComponent({
  name: 'Home',
  components:{
    NavigationBar,
    LiftBar,
    Footer,
  },
  setup(){

    let sys = ref({

    })
    const getSys = () => {
      request.post("setup",{}).then((res:any)=>{
        if (res.code == 200 ) {
          sys.value = res.data
        }
      })
    }
    return {
      sys,
      getSys
    }
  },
  beforeCreate() {
    this.getSys()
  }
});
</script>
<style>
.el-header {
  background-color: #b3c0d1;
  color: var(--el-text-color-primary);
  text-align: center;
  height: 100px;
}
.el-footer {
  background-color: #b3c0d1;
  color: var(--el-text-color-primary);
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: var(--el-text-color-primary);
  text-align: center;
  width:200px
}

.el-main {
  background-color: #e9eef3;
  color: var(--el-text-color-primary);
  text-align: center;
  line-height: 160px;
  height: 700px;
}

</style>
